<template>
	<view style="background: #FDFFE9;min-height: 100vh;">
		<view class="">
			<view style="margin: 0 44rpx;">
				<image src="https://boyubasketball.oss-cn-shanghai.aliyuncs.com/1751981522313weilaixing.png"
					mode="widthFix" style="width: 100%;"></image>
			</view>
			<view class="mt40" style="padding: 0 54rpx;">
				<image src="https://boyubasketball.oss-cn-shanghai.aliyuncs.com/1751981179157baomingliucheng.png"
					@click="goPage({title:'报名流程'})" mode="widthFix" style="width:100%;border-radius: 60rpx;"></image>
				<view class="f-x-ad mt40 mb20">
					<view class="t-c" v-for="(item,index) in titleList" :key="index" @click="goPage(item)">
						<image :src="`/static/newYdsg/${item.icon}.png`" style="width:80rpx;height: 80rpx;"></image>
						<view class="t-c f28" style="color: #6326FF;">{{item.title}}</view>
					</view>
				</view>
				<view class="f-s-c mt20">
					<a href="https://yundongshugen.com/#/pages/index?id=202&name=%E2%80%9C%E5%85%A8%E6%B0%91%E5%85%A8%E8%BF%90%E2%80%9D%E7%AC%AC%E4%B8%89%E5%B1%8A%E5%B9%BF%E4%B8%9C%E7%9C%81%E6%9C%AA%E6%9D%A5%E6%98%9F%E7%AF%AE%E7%90%83%E8%81%94%E8%B5%9B%E6%B7%B1%E5%9C%B3%E8%B5%9B%E5%8C%BAU5%E7%BB%84&img=17515209013431583935612-compressed-IMG_6958.JPG"
						target="_blank" style="width:50%;transform: scale(0.95);">
						<image src="/static/newYdsg/index-gzh.png" mode="widthFix" style="width: 100%;">
						</image>
					</a>
					<image src="/static/newYdsg/index-gzh2.png" style="width:50%;transform: scale(0.95);"
						mode="widthFix" @click="goPage({title:'赛事微信'})"></image>
					<!-- <view class="w50 bs20 ml20" style="width:50%;background: #FFEABF;height: 145rpx;"
						@click="goPage({title:'赛事微信'})">
						<view class="p3 wei f34 f-y-c" style="color: #3F0000;">
							<u-icon name="weixin-fill" color="#3F0000" size="24px"></u-icon>
							添加赛事微信
						</view>
						<view class="ml40 f24" style="color: #3F0000;margin-top: -6rpx;">
							咨询赛事报名相关事宜
						</view>
					</view> -->
				</view>
				<image src="/static/newYdsg/index-ssdt.png" mode="widthFix" style="margin: 30rpx auto;">
				</image>
				<image src="https://boyubasketball.oss-cn-shanghai.aliyuncs.com/1751981413413jingsaiguize.png"
					@click="goPage({title:'竞赛规则'})" class="mb20" mode="widthFix"
					style="width:100%;border-radius: 60rpx;">
				</image>
				<image src="https://boyubasketball.oss-cn-shanghai.aliyuncs.com/1751981179157baomingliucheng.png"
					@click="goPage({title:'报名流程'})" mode="widthFix" style="width:100%;border-radius: 60rpx;"
					class="mb20"></image>
				<image src="https://boyubasketball.oss-cn-shanghai.aliyuncs.com/1751981594713xingweishouze.png"
					@click="goPage({title:'行为守则'})" class="mb20" mode="widthFix"
					style="width:100%;border-radius: 60rpx;">
				</image>
				<!-- @click="goPage({title:'参赛须知'})" -->
			</view>
		</view>
		<tabbar ref="tabbars" :floorstatus="floorstatus" @HandlerTop="handlerTopIcon" type="0"
			@tabEvent="getNoticeInfo">
		</tabbar>
	</view>
</template>

<script>
	import tabbar from '../../tabbarComponent/tabbar';
	import call from '@/components/call/call';
	import iconfont from '@/iconfont/iconfont';
	import login from '@/components/login-view/login-view';
	import getLocation from '@/components/getLocation/getLocation';
	//index.js
	//获取应用实例
	const app = getApp();
	const $index = require('../../request/api/v1/index');
	export default {
		components: {
			tabbar,
			call,
			iconfont,
			login,
			getLocation
		},
		data() {
			return {
				floorstatus: false,
				titleList: [{
						title: '报名',
						icon: 'titleIcon1'
					},
					{
						title: '报名流程',
						icon: 'titleIcon2'
					},
					{
						title: '竞赛规则',
						icon: 'titleIcon3'
					},
					{
						title: '行为守则',
						icon: 'titleIcon4'
					},
				],
				userToken: '',
				jxgzList: ['https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432239113201.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432241074502.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432242031003.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432242860804.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432243727405.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432244560206.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432245411907.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432246197708.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432246986009.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432247745710.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432248548011.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432249399412.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432250444313.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432251241014.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432252216115.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432253016916.png'
				],
				xwszList: [
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432278552301.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432280784402.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432281519003.png',
					'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/175432282271304.png'
				]
			}
		},
		onShow() {
			this.userToken = localStorage.getItem("tokenValue") || ''
		},
		methods: {
			goDetail() {
				uni.navigateTo({
					url: '/pages/index/detail?imgLik='
				});
			},
			goPage(item) {
				if (item.title == '报名') {
					if (!this.userToken) {
						uni.showToast({
							title: '请先登录',
							icon: 'none'
						});
						localStorage.clear();
						setTimeout(() => {
							uni.navigateTo({
								url: '/pages/business/wxLogin'
							});
						}, 1500)
						return
					}
					uni.navigateTo({
						url: '/pages/business/joinMatch'
					});
				} else {
					// this.goDetail(item.title)
					let ossCdn = 'https://boyubasketball.oss-cn-shanghai.aliyuncs.com/'
					let jsgzStr = this.jxgzList.join(',')
					let xwszStr = this.xwszList.join(',')
					let pageImg = new Map([
						['赛事微信', `${ossCdn}175008088137220250616213321.jpg`],
						['参赛须知', `${ossCdn}1751291388198notes.png`],
						['竞赛规则', jsgzStr],
						['行为守则', xwszStr],
						['报名流程', `${ossCdn}1754403297141bmlc.png`],
					])
					let imagePath = pageImg.get(item.title)
					uni.navigateTo({
						url: `/pages/index/detail?imgLik=${imagePath}`
					});
				}
			}
		}
	};
</script>
<style>
	@import './index.css';
</style>